﻿
using B.S.DataBase.MyProject.Domain.RBAC;
using Microsoft.EntityFrameworkCore;
using B.S.DataBase.MyProject.Domain.WhereHorse;
using B.S.DataBase.MyProject.Domain.Sales;
using B.S.DataBase.MyProject.Domain.OutboundShipments;
using B.S.DataBase.MyProject.Domain;
using B.S.DataBase.MyProject.Domain.Vendors;
using B.S.DataBase.MyProject.Domain.Procurements;
using B.S.DataBase.MyProject.Domain.Departments;
using B.S.DataBase.MyProject.Domain.Materials;
using B.S.DataBase.MyProject.Domain.Clients;
using B.S.DataBase.MyProject.Domain.Storages;
using B.S.DataBase.MyProject.Domain.SalesReports;
using B.S.DataBase.MyProject.Domain.productionworkorder;
using B.S.DataBase.MyProject.Domain.BOM;
using B.S.DataBase.MyProject.Domain.SaleOrders;
using B.S.DataBase.MyProject.Domain.Tickettoticket;
using B.S.DataBase.MyProject.Domain.ArrivalCheck;
using B.S.DataBase.MyProject.Domain.procedure;


namespace B.S.DataBase.MyProject.Infrastructure
{
    /// <summary>
    /// 上下文
    /// </summary>
    public class SDbContext : DbContext
    {
        public SDbContext(DbContextOptions options) : base(options)
        {
        }

        public DbSet<User> Users { get; set; }
        public DbSet<Role> Roles { get; set; }
        public DbSet<UserRole> UserRoles { get; set; }
        public DbSet<Menu> Menus { get; set; }
        public DbSet<RoleMenu> RoleMenus { get; set; }
        public DbSet<SystemLog> SystemLog { get; set; }


        #region 赵策
        #region 第一周和第二周

        /// <summary>
        /// 部门
        /// </summary>
        public DbSet<DepartModel> departs { get; set; }
        /// <summary>
        /// 物料基本档
        /// </summary>
        public DbSet<Material_BasicModel> material_Basics { get; set; }
        /// <summary>
        /// 物料分类
        /// </summary>
        public DbSet<MaterialCategoryModel> materialCategories { get; set; }
        /// <summary>
        /// 供应方式
        /// </summary>
        public DbSet<SupplyMethodModel> supplyMethods { get; set; }
        /// <summary>
        /// 计量单位
        /// </summary>
        public DbSet<UnitOfMeasurementModel> unitOfMeasurements { get; set; }

        /// <summary>
        /// 开票通知单
        /// </summary>
        public DbSet<InvoiceSettlementEntity> invoiceSettlementEntities { get; set; }
        /// <summary>
        /// 退货通知单表
        /// </summary>
        public DbSet<return_notice_main> return_Notice_Mains { get; set; }
        #endregion

        #region 生产工单
        /// <summary>
        /// 基本信息表
        /// </summary>
        public DbSet<ProductionWorkOrderBasicInfoSheet> GongDanXinXi { get; set; }
        /// <summary>
        /// 生产物品表
        /// </summary>
        public DbSet<ProductionItem> GongDanWuPin { get; set; }
        /// <summary>
        /// 工序流程表
        /// </summary>
        public DbSet<ProcessFlowSheet> GongDanLiuCheng { get; set; }
        /// <summary>
        /// 生产单号表
        /// </summary>
        public DbSet<AssociatedProductionOrder> DanHaoId { get; set; }
        /// <summary>
        /// 生产单号--物品表
        /// </summary>
        public DbSet<item_classification_detail> WuPinId { get; set; }
        /// <summary>
        /// 工艺路线表
        /// </summary>
        public DbSet<ProcessRoute> LuXian {  get; set; }

        /// <summary>
        /// 操作记录表
        /// </summary>
        public DbSet<CaoZuoJiLu> caoZuoJiLus { get; set; }



        #endregion

        #region 质检工单

        public DbSet<QualityInspectionWorkOrder> ZJInfo { get; set; }

        #endregion

        #endregion








        //=============================================================================================

        /// <summary>
        /// 客户档案
        /// </summary>
        public DbSet<CustomerProfiles> CustomerProfiles { get; set; }
        /// <summary>
        /// 开票信息
        /// </summary>
        public DbSet<InvoicingInformation> InvoicingInformation { get; set; }
        /// <summary>
        /// 业务联系人
        /// </summary>
        public DbSet<BusinessContacts> BusinessContacts { get; set; }
        /// <summary>
        /// 仓库列表
        /// </summary>
        public DbSet<BaseStorage> BaseStorage { get; set; }
        /// <summary>
        /// 货位表
        /// </summary>
        public DbSet<Freight> Freight { get; set; }
        /// <summary>
        /// 采购发票
        /// </summary>
        public DbSet<PurchaseInvoice> PurchaseInvoice { get; set; }
        /// <summary>
        /// 采购退货单
        /// </summary>
        public DbSet<Preturnorder> Preturnorder { get; set; }
        /// <summary>
        /// 销售退货明细表
        /// </summary>
        public DbSet<SalesReturns> SalesReturns { get; set; }
        /// <summary>
        /// 采购订单明细
        /// </summary>
        public DbSet<Purchaseorderbeath> Purchaseorderbeath { get; set; }
        /// <summary>
        /// 采购订单工单
        /// </summary>
        public DbSet<InfrastrucModel> InfrastrucModel { get; set; }
        /// <summary>
        /// 请购单
        /// </summary>
        public DbSet<JoinGetOrder> JoinGetOrder { get; set; }
        /// <summary>
        /// 销售订单
        /// </summary>
        public DbSet<ShouOrder> ShouOrder { get; set; }


        //===============================================================================
        //王东暄
        /// <summary>
        /// 采购入库表
        /// </summary>
        public DbSet<PurchaseInRepository> PurchaseInRepository { get; set; }
        /// <summary>
        /// 销售出库表
        /// </summary>
        public DbSet<SaleOutRepository> SaleOutRepository { get; set; }
        /// <summary>
        /// 销售订单表
        /// </summary>
        public DbSet<SaleOrderInfo> SaleOrderInfo { get; set; }
        /// <summary>
        /// 订单物料表
        /// </summary>

        public DbSet<OrderMaterials> OrderMaterials {  get; set; }
        /// <summary>
        /// 到货检验表
        /// </summary>

        public DbSet<ArrivalCheck> ArrivalCheck { get; set; }
        /// <summary>
        /// 质检记录表
        /// </summary>

        public DbSet<CheckRecord> CheckRecord { get; set; }

        #region 张文龙
        /// <summary>
        /// 流程
        /// </summary>
        public DbSet<AppProcess> AppProcess { get; set; }

        /// <summary>
        /// 记录
        /// </summary>
        public DbSet<ApprovalTrail> ApprovalTrails { get; set; }

        /// <summary>
        /// 开票到票表
        /// </summary>
        public DbSet<Billingder> Billingders { get; set; }

        /// <summary>
        /// 销售订单
        /// </summary>
        public DbSet<OrdersSele> OrdersSeles { get; set; }

        /// <summary>
        /// 采购订单
        /// </summary>
        public DbSet<urchaseOrdp> urchaseOrdps { get; set; }


        /// <summary>
        /// 原料供应商表
        /// </summary>
        public DbSet<MaterialSupplier> MaterialSupplier { get; set; }
        /// <summary>
        /// 供应商表
        /// </summary>
        public DbSet<Supplierprovendor> Supplierprovendor { get; set; }
        /// <summary>
        /// 供应料品表
        /// </summary>
        public DbSet<Supplieditems> Supplieditems { get; set; }


        /// <summary>
        /// 采购部门表
        /// </summary>
        public DbSet<Purchasing> Purchasing { get; set; }

        /// <summary>
        /// 业务类型表
        /// </summary>
        public DbSet<Document> Documents { get; set; }

        /// <summary>
        /// 采购订单表
        /// </summary>
        public DbSet<Purchaseorder> Purchaseorders { get; set; }


        /// <summary>
        /// 采购到货表
        /// </summary>
        public DbSet<PurchaseArrival> PurchaseArrivals { get; set; }

        /// <summary>
        /// 采购订单物料信息表
        /// </summary>
        public DbSet<Materials_Info> MaterialsInfos { get; set; }

        /// <summary>
        /// 采购订单物料编码表
        /// </summary>
        public DbSet<Matern_Code> MaternCodes { get; set; }

        #endregion


        #region 张靖威
        /// <summary>
        /// 7天交货明细表
        /// </summary>
        public DbSet<DeliveryDetail> DeliveryDetails { get; set; }
        /// <summary>
        /// 发货通知单表
        /// </summary>
        public DbSet<DeliveryNotice> DeliveryNotice { get; set; }
        /// <summary>
        /// 销售订单明细表
        /// </summary>
        public DbSet<SalesOrderDetails> SalesOrderDetailss { get; set; }
        /// <summary>
        /// BOM信息表
        /// </summary>
        public DbSet<BomInfo> BomInfo {  get; set; }
        /// <summary>
        /// BOM配件
        /// </summary>
        public DbSet<BomParts> BomParts {  get; set; }
        /// <summary>
        /// 工艺流程
        /// </summary>
        public DbSet<ProcessInfo> ProcessInfos {  get; set; }
        /// <summary>
        /// 操作记录
        /// </summary>
        public DbSet<OperationRecord> OperationRecord {  get; set; }
        #endregion
    }
}


